package com.qst.express.utils;

import com.qst.express.entity.User;

import javax.servlet.http.HttpSession;

/**
 * @author:CoolTiger
 * @title: UserUtil
 * @projectName springboot-e
 * @description: TODO
 * @date:2022/09/25/15:01:30
 **/
public class UserUtil {
    public static void  setAdminPhone(HttpSession session,String adminPhone){
        session.setAttribute("adminPhone",adminPhone);
    }
    public static String  getAdminPhone(HttpSession session){
        return (String) session.getAttribute("adminPhone");
    }
    public static void  setWxUser(HttpSession session, User user){
        session.setAttribute("wxUser",user);
    }
    public static User  getWxUser(HttpSession session){
        return (User) session.getAttribute("wxUser");
    }
    public static  String getLoginSms(HttpSession session,  String userPhone){
        return (String) session.getAttribute(userPhone);

    }
    public static  void setLoginSms(HttpSession session,String userPhone,String code){
        session.setAttribute(userPhone,code);

    }
}
